PROGRAM main
  VAR
    // 指示灯
    bIndicatorLight AT %QX0.1 : BOOL;
  END_VAR

  VAR CONSTANT
    // 灭持续时间
    tLightOff : TIME := T#5s;
    // 亮持续时间
    tLightOn : TIME := T#3s;
  END_VAR

  VAR
    // 灭灯定时器
    aTon1 : TON;
    // 亮灯定时器
    aTon2 : TON;
  END_VAR

aTon1(IN := NOT aTon2.Q, PT := tLightOff);
aTon2(IN := aTon1.Q, PT := tLightOn);
bIndicatorLight := aTon1.Q;
END_PROGRAM
